<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/views/modules/sys/menu-add-or-update.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\..\..\index.html">All files</a> / <a href="index.html">src/views/modules/sys</a> menu-add-or-update.vue
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/75</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/44</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/33</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/54</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252</td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;<span class="cstat-no" title="statement not covered" >t<span class="fstat-no" title="function not covered" >em</span>plate&gt;</span>
  &lt;el-dialog
    :title="!dataForm.id ? '新增' : '修改'"
<span class="cstat-no" title="statement not covered" >    :close-on-click-modal="false"</span>
    :visible.sync="visible"&gt;
    &lt;el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px"&gt;
      &lt;el-form-item label="类型" prop="type"&gt;
        &lt;el-r<span class="cstat-no" title="statement not covered" >adio-group v-model=</span>"dataForm.type"&gt;
          &lt;el-radio v-for="(type, index) in dataForm.typeList" :label="index" :key="index"&gt;{{ type }}&lt;/el-radio&gt;
        &lt;/el-<span class="cstat-no" title="statement not covered" >radio-group&gt;</span>
      &lt;/el-form-item&gt;
      &lt;el-form<span class="cstat-no" title="statement not covered" >-item :label="dataForm.typeList</span>[dataForm.type] + '名称'" prop="name"&gt;
        &lt;el-input v-model="dataForm.name" :placeholder="dataForm.typeList[dataForm.type] + '名称'"&gt;&lt;/el-input&gt;
      &lt;/e<span class="fstat-no" title="function not covered" >l-form-item&gt;<span class="cstat-no" title="statement not covered" ></span></span>
      &lt;el-form-item label="上级菜单" prop="parentName"&gt;
        &lt;el-popover
          ref="menuListPopover"
          placement="bottom-start"
          trigger="click"&gt;
          &lt;el-tree
            :data="menuList"
            :props="menuListTreeProps"
            node-key="menuId"
            ref="menuListTree"
            @current-change="menuListTreeCurrentChangeHandle"
            :default-expand-all="true"
            :highlight-current="true"
            :expand-on-click-node="false"&gt;
          &lt;/el-tree&gt;
        &lt;/el-popover&gt;
        &lt;el-input v-model="dataForm.parentName" v-popover:menuListPopover :readonly="true" placeholder="点击选择上级菜单" class="menu-list__input"&gt;&lt;/el-input&gt;
      &lt;/el-form-item&gt;
      &lt;el-form-item v-if="dataForm.type === 1" label="菜单路由" prop="url"&gt;
        &lt;el-input v-model="dataForm.url" placeholder="菜单路由"&gt;&lt;/el-input&gt;
      &lt;/el-form-item&gt;
      &lt;el-form-item v-if="dataForm.type !== 0" label="授权标识" prop="perms"&gt;
        &lt;el-input v-model="dataForm.perms" placeholder="多个用逗号分隔, 如: user:list,user:create"&gt;&lt;/el-input&gt;
      &lt;/el-form-item&gt;
      &lt;el-form-item v-if="dataForm.type !== 2" label="排序号" prop="orderNum"&gt;
        &lt;el-input-number v-model="dataForm.orderNum" controls-position="right" :min="0" label="排序号"&gt;&lt;/el-input-number&gt;
      &lt;/el-form-item&gt;
      &lt;el-form-item v-if="dataForm.type !== 2" label="菜单图标" prop="icon"&gt;
        &lt;el-row&gt;
          &lt;el-col :span="22"&gt;
            &lt;el-popover
              ref="iconListPopover"
              placement="bottom-start"
              trigger="click"
              popper-class="mod-menu__icon-popover"&gt;
              &lt;div class="mod-menu__icon-list"&gt;
                &lt;el-button
                  v-for="(item, index) in iconList"
                  :key="index"
                  @click="iconActiveHandle(item)"
                  :class="{ 'is-active': item === dataForm.icon }"&gt;
                  &lt;icon-svg :name="item"&gt;&lt;/icon-svg&gt;
                &lt;/el-button&gt;
              &lt;/div&gt;
            &lt;/el-popover&gt;
            &lt;el-input v-model="dataForm.icon" v-popover:iconListPopover :readonly="true" placeholder="菜单图标名称" class="icon-list__input"&gt;&lt;/el-input&gt;
          &lt;/el-col&gt;
          &lt;el-col :span="2" class="icon-list__tips"&gt;
            &lt;el-tooltip placement="top" effect="light"&gt;
              &lt;div slot="content"&gt;全站推荐使用SVG Sprite, 详细请参考:&lt;a href="//github.com/daxiongYang/renren-fast-vue/blob/master/src/icons/index.js" target="_blank"&gt;icons/index.js&lt;/a&gt;描述&lt;/div&gt;
              &lt;i class="el-icon-warning"&gt;&lt;/i&gt;
            &lt;/el-tooltip&gt;
          &lt;/el-col&gt;
        &lt;/el-row&gt;
      &lt;/el-form-item&gt;
    &lt;/el-form&gt;
    &lt;span slot="footer" class="dialog-footer"&gt;
      &lt;el-button @click="visible = false"&gt;取消&lt;/el-button&gt;
      &lt;el-button type="primary" @click="dataFormSubmit()"&gt;确定&lt;/el-button&gt;
    &lt;/span&gt;
  &lt;/el-dialog&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
  import { treeDataTranslate } from '@/utils'
  import Icon from '@/icons'
  export default {
    data () {
      var validateUrl = (rule, value, callback) =&gt; {
        if (this.dataForm.type === 1 &amp;&amp; !/\S/.test(value)) {
          callback(new Error('菜单URL不能为空'))
        } else {
          callback()
        }
      }
      return {
        visible: false,
        dataForm: {
          id: 0,
<span class="cstat-no" title="statement not covered" >          type: 1,</span>
          typeLis<span class="fstat-no" title="function not covered" >t: ['</span>目录', '菜单', '按钮'],
          name: <span class="cstat-no" title="statement not covered" >'',</span>
          parentId: 0,
          parentName: <span class="cstat-no" title="statement not covered" >'',<span class="fstat-no" title="function not covered" ></span></span>
<span class="cstat-no" title="statement not covered" >          url: '',</span>
<span class="cstat-no" title="statement not covered" >          perms: '',</span>
          orderNum: 0,
<span class="cstat-no" title="statement not covered" >          icon: '',</span>
          iconList: []
        },
<span class="cstat-no" title="statement not covered" >        dataRule: {</span>
          name: [
            { required: true, message: '菜单名称不能为空', trigger: 'blur' }
          ],
          parentName: [
            { required: true, message: '上级菜单不能为空', trigger: 'change' }
          ],
          url: [
            { validator: validateUrl, trigger: 'blur' }
          ]
        },
        menuList: [],
        menuListTreeProps: {
          label: 'name',
          children: 'children'
        }
      }
    },
    created () {
      this.iconList = Icon.getNameList()
    },
    methods: {
      init (id) {
        this.dataForm.id = id || 0
        this.$http({
          url: this.$http.adornUrl('/sys/menu/select'),
          method: 'get',
          params: th<span class="fstat-no" title="function not covered" >is.$http</span>.adornParams()
<span class="cstat-no" title="statement not covered" >        }).then(({data}) =&gt; {</span>
          this.menuList = treeDataTranslate(data.menuList, 'menuId')
        }).then(() =&gt; {
          this.visible = true
          this.$nex<span class="fstat-no" title="function not covered" >tTick</span>(() =&gt; {
            this.$r<span class="cstat-no" title="statement not covered" >efs['</span>dataForm'].resetFields()
          })
<span class="cstat-no" title="statement not covered" >        }).then(() =&gt; {</span>
<span class="cstat-no" title="statement not covered" >          if (!this.dataForm.id) {</span>
            // 新增
            this.menuListTreeSetCurrentNode()
          } else {
            //<span class="fstat-no" title="function not covered" > 修</span>改
            this.$h<span class="cstat-no" title="statement not covered" >ttp({</span>
              url: this.$http.adornUrl(`/sys/menu/info/${this.dataForm.id}`),
<span class="cstat-no" title="statement not covered" >              method: 'get',</span>
<span class="fstat-no" title="function not covered" >              pa</span>rams: this.$http.adornParams()
<span class="cstat-no" title="statement not covered" >            }).then(({data}) =&gt;</span> {
<span class="cstat-no" title="statement not covered" >              this.dataFo<span class="fstat-no" title="function not covered" >rm</span>.id = data.menu.menuId</span>
<span class="cstat-no" title="statement not covered" >              this.dataForm.type = data.menu.type</span>
              this.dataForm.name = data.menu.name
<span class="fstat-no" title="function not covered" >              th</span>is.dataForm.parentId = data.menu.parentId
<span class="cstat-no" title="statement not covered" >              this.dataForm.url = data.menu.url</span>
              this.dataForm.perms = data.menu.perms
<span class="cstat-no" title="statement not covered" >              this.dataForm.orderNum = data.men</span>u.orderNum
              this.dataForm.icon = data.menu.icon
              this.menuListTreeSetCurrentNode()
<span class="cstat-no" title="statement not covered" >            })</span>
          }
        })
      },
      // 菜单树选中<span class="fstat-no" title="function not covered" ></span>
      menuListTreeCurre<span class="cstat-no" title="statement not covered" >ntChangeHan</span>dle (data, node) {
        this.dataForm.parentId = data.menuId
        this<span class="cstat-no" title="statement not covered" >.dataForm.parentName = data.name</span>
      },<span class="cstat-no" title="statement not covered" ></span>
      // 菜单树<span class="cstat-no" title="statement not covered" >设置当前选中节点</span>
      menuLi<span class="cstat-no" title="statement not covered" >stTreeSetCurrentNode () {</span>
        this<span class="cstat-no" title="statement not covered" >.$refs.menuListTree.setCurrentKey(thi</span>s.dataForm.parentId)
        this<span class="cstat-no" title="statement not covered" >.dataForm.parentName = (this.$refs.menuLi</span>stTree.getCurrentNode() || {})['name']
      },<span class="cstat-no" title="statement not covered" ></span>
      // 图标选<span class="cstat-no" title="statement not covered" >中</span>
      iconAc<span class="cstat-no" title="statement not covered" >tiveHandle (iconName) {</span>
        this.dataForm.icon = iconName
      },
      // 表单提交
      dataFormSubmit () {
        this.$refs['dataForm'].validate((valid) =&gt; {
          if (valid) {
            this.$http({<span class="fstat-no" title="function not covered" ></span>
<span class="cstat-no" title="statement not covered" >              url: this.$http.adornUrl(`/sys</span>/menu/${!this.dataForm.id ? 'save' : 'update'}`),
<span class="cstat-no" title="statement not covered" >              method: 'post',</span>
              data: this.$http.adornData({
                'menuId': this.dataForm.id || undefined,
                'type': this.dataForm.type,
                'name': this.dataForm.nam<span class="fstat-no" title="function not covered" >e,</span>
<span class="cstat-no" title="statement not covered" >                'parentId': this.dataForm.parentId,</span>
<span class="cstat-no" title="statement not covered" >                'url': this.dataForm.url,</span>
                'perms': this.dataForm.perms,
                'orderNum': this.dataForm.orderNum,
                'icon': this.dataForm.icon
              })<span class="fstat-no" title="function not covered" ></span>
<span class="cstat-no" title="statement not covered" >            }).then(({data}) =&gt; {</span>
              if (data &amp;&amp; data.code === 0) {
                this.$message({
                  message: '操作成功',
                  type: 'succ<span class="fstat-no" title="function not covered" >ess',</span>
                  d<span class="cstat-no" title="statement not covered" >urati</span>on: 1500,
                  onClose: () =&gt; {
<span class="cstat-no" title="statement not covered" >                    this.visible = fal<span class="fstat-no" title="function not covered" >se</span></span>
<span class="cstat-no" title="statement not covered" >                    this.$emit('refreshDataList')</span>
<span class="cstat-no" title="statement not covered" >                  }</span>
                })
              } else {
                this.$message.error(data.msg)
              }
            })
          }
        })
      }
    }
  }
&lt;/script&gt;
&nbsp;
&lt;style lang="scss"<span class="fstat-no" title="function not covered" >&gt;</span>
  .mod-menu {<span class="cstat-no" title="statement not covered" ></span>
    .menu-list__input,
    .icon-li<span class="cstat-no" title="statement not covered" >st__input {</span>
       &gt; .el-i<span class="cstat-no" title="statement not covered" >nput__inner {</span>
        cursor: pointer;
      }
    }
    &amp;__icon-popover {<span class="fstat-no" title="function not covered" ></span>
      max-width: 3<span class="cstat-no" title="statement not covered" >70px;</span>
    }<span class="cstat-no" title="statement not covered" ></span>
    &amp;__icon-list {
      max-height: 180px;
      padding: 0;
      margin: <span class="cstat-no" title="statement not covered" >-8px 0 0 -8px;</span>
      &gt; .el-button {
        padding: 8px;
        margin: 8px 0 0 8px;
        &gt; span {
          display: inline-block;
          vertical-align: middle;
          width: 18px;
          height: 18px;
<span class="cstat-no" title="statement not covered" >          font-size: 18px;<span class="cstat-no" title="statement not covered" ></span></span>
        }<span class="cstat-no" title="statement not covered" ></span>
<span class="cstat-no" title="statement not covered" >      }<span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ><span class="fstat-no" title="function not covered" ></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>
<span class="cstat-no" title="statement not covered" >    }</span>
    .icon-list__tips {
      font-size: 18px;
      text-align: center;
      color: #e6a23c;
      cursor: pointer;
    }
  }
&lt;/style&gt;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Sep 20 2018 10:14:21 GMT+0800 (中国标准时间)
</div>
</div>
<script src="..\..\..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\..\..\sorter.js"></script>
</body>
</html>
